#pragma once

#include <pybind11/chrono.h>
#include <pybind11/complex.h>
#include <pybind11/functional.h>
#include <pybind11/operators.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <pybind11/stl_bind.h>

#include <qlib/all.h>
#include <qlib/core/dll.h>

namespace py = pybind11;
using namespace qlib;

#define DEF_METHOD(ClassName, MethodName) py_##ClassName.def(#MethodName, &ClassName::MethodName);
#define DEF_STATS(ClassName, StatsName) py_##ClassName.def_readwrite(#StatsName, &ClassName::StatsName);

using Vec2d = Vec2<double>;
PYBIND11_MAKE_OPAQUE(std::vector<Vec2d>)
PYBIND11_MAKE_OPAQUE(std::vector<double>)

template <typename T>
size_t vector_size(std::vector<T>& array) {
  return array.size();
}

template <typename T>
void vector_resize(std::vector<T>& array, size_t size) {
  array.resize(size);
}